home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / MacODBC / ODBC Tools / INCLUDE / ODBCINST.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-29  |  4.2 KB  |  113 lines  |  [TEXT/MPS ]

  1. /*--------------------------------------------------------------------------
  2.   ODBCInst.h -- Prototypes for ODBCINST.DLL
  3.  
  4.   (c) Microsoft Corp., 1990-1993
  5.   (c) 1995 by Visigenic Software, Inc., all rights reserved.
  6. --------------------------------------------------------------------------*/
  7.  
  8. #ifndef __ODBCINST_H
  9. #define __ODBCINST_H
  10.  
  11. #include "sqlplat.h"
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {                               // Assume C declarations for C++
  15. #endif    // __cplusplus
  16.  
  17.  
  18. // Constants ---------------------------------------------------------------
  19. // SQLConfigDataSource request flags
  20. #define  ODBC_ADD_DSN     1               // Add data source
  21. #define  ODBC_CONFIG_DSN  2               // Configure (edit) data source
  22. #define  ODBC_REMOVE_DSN  3               // Remove data source
  23.  
  24. #ifndef RC_INVOKED
  25.  
  26. // Prototypes --------------------------------------------------------------
  27.  
  28. // High level APIs
  29.  
  30. BOOL_INSTAPI SQLManageDataSources    (SQLHWND       hwndParent);
  31. BOOL_INSTAPI SQLCreateDataSource     (SQLHWND       hwndParent,
  32.                                       LPCSTR     lpszDSN);
  33. BOOL_INSTAPI SQLGetTranslator        (SQLHWND       hwnd,
  34.                                        LPSTR      lpszName,
  35.                                        WORDPARAM       cbNameMax,
  36.                                        WORDPARAM  FAR *pcbNameOut,
  37.                                        LPSTR      lpszPath,
  38.                                        WORDPARAM       cbPathMax,
  39.                                        WORDPARAM  FAR *pcbPathOut,
  40.                                        DWORD FAR *pvOption);
  41.  
  42. // Low level APIs
  43. // NOTE: The high-level APIs should always be used. These APIs
  44. //       have been left for compatibility.
  45.  
  46. BOOL_INSTAPI SQLGetInstalledDrivers  (LPSTR      lpszBuf,
  47.                                       WORDPARAM       cbBufMax,
  48.                                       WORDPARAM FAR * pcbBufOut);
  49. BOOL_INSTAPI SQLConfigDataSource     (SQLHWND       hwndParent,
  50.                                       WORDPARAM       fRequest,
  51.                                       LPCSTR     lpszDriver,
  52.                                       LPCSTR     lpszAttributes);
  53. BOOL_INSTAPI SQLRemoveDefaultDataSource(void);
  54. BOOL_INSTAPI SQLWriteDSNToIni        (LPCSTR     lpszDSN,
  55.                                       LPCSTR     lpszDriver);
  56. BOOL_INSTAPI SQLRemoveDSNFromIni     (LPCSTR     lpszDSN);
  57. BOOL_INSTAPI SQLValidDSN             (LPCSTR     lpszDSN);
  58.  
  59. #if INSTALL_API
  60. // Installation API: may not be supported on all platforms
  61. BOOL_INSTAPI SQLInstallODBC          (SQLHWND       hwndParent,
  62.                                       LPCSTR     lpszInfFile,
  63.                                       LPCSTR     lpszSrcPath,
  64.                                       LPCSTR     lpszDrivers);
  65. BOOL_INSTAPI SQLInstallDriver        (LPCSTR     lpszInfFile,
  66.                                       LPCSTR     lpszDriver,
  67.                                       LPSTR      lpszPath,
  68.                                       WORD       cbPathMax,
  69.                                       WORD FAR * pcbPathOut);
  70. BOOL_INSTAPI SQLInstallDriverManager (LPSTR      lpszPath,
  71.                                       WORD       cbPathMax,
  72.                                       WORD FAR * pcbPathOut);
  73. BOOL_INSTAPI SQLGetAvailableDrivers  (LPCSTR     lpszInfFile,
  74.                                       LPSTR      lpszBuf,
  75.                                       WORD       cbBufMax,
  76.                                       WORD FAR * pcbBufOut);
  77. #endif // INSTALL_API
  78.  
  79. #if SQL_PROFILE_STRING
  80. BOOL_INSTAPI SQLWritePrivateProfileString(LPCSTR lpszSection,
  81.                                          LPCSTR lpszEntry,
  82.                                          LPCSTR lpszString,
  83.                                          LPCSTR lpszFilename);
  84.  
  85. PROFILE_CB_INSTAPI  SQLGetPrivateProfileString( LPCSTR lpszSection,
  86.                                         LPCSTR lpszEntry,
  87.                                         LPCSTR lpszDefault,
  88.                                         LPSTR  lpszRetBuffer,
  89.                                         PROFILE_CB cbRetBuffer,
  90.                                         LPCSTR lpszFilename);
  91. #else // SQL_PROFILE_STRING
  92. #define SQLGetPrivateProfileString   GetPrivateProfileString
  93. #define SQLWritePrivateProfileString WritePrivateProfileString
  94. #endif // SQL_PROFILE_STRING
  95.  
  96. //    Driver specific Setup APIs called by installer
  97.  
  98. BOOL_INSTAPI ConfigDSN (SQLHWND    hwndParent,
  99.                         WORDPARAM    fRequest,
  100.                         LPCSTR    lpszDriver,
  101.                         LPCSTR    lpszAttributes);
  102.  
  103. BOOL_INSTAPI ConfigTranslator (    SQLHWND        hwndParent,
  104.                                 DWORD FAR  *pvOption);
  105.  
  106. #endif // RC_INVOKED
  107.  
  108. #ifdef __cplusplus
  109. }                                    // End of extern "C" {
  110. #endif    // __cplusplus
  111.  
  112. #endif // __ODBCINST_H
  113.